{extend name="public:_base" /}

{block name="js"}
<link rel="stylesheet" type="text/css"
    href="__STATIC__/admin/hui/lib/ueditor/1.4.3/third-party/codemirror/codemirror.css">
<script type="text/javascript"
    src="__STATIC__/admin/hui/lib/ueditor/1.4.3/third-party/codemirror/codemirror.js"></script>
<script type="text/javascript">
    var editor = CodeMirror.fromTextArea(document.getElementById('content'), {
        lineNumbers: true,
        lineWrapping: true,
        mode: 'text/html'
    });

</script>
{include file="public/_validform"}
<!--验证-->
<script type="text/javascript" src="__STATIC__/admin/js/tempname.js"></script>
{/block}
{block name="main"}

{include file="setview/bar" /}

<div class="page-container">
    <div class="mDiv">
        <div class="ftitle">
            <h3>文件列表(共{$dirlist|count}条记录)</h3>
        </div>
    </div>

    <div class="row cl">
        <label class="form-label col-xs-2 col-sm-2">
            {volist name="dirlist" id="vo"}
            <a href="{:url('setview/index',['dir'=>$vo.dir,'name'=>$vo.name,'type'=>$type])}"
                title="{$vo.name}">{$vo.filename}</a><br>
            {/volist}
        </label>
        <div class="formControls col-xs-10 col-sm-10">
            {notempty name="$value"}
            <H2 title="{$dirfile}">{$dirfile}</H2>
            <form action="{:url('setview/save')}" method="post" id="form">
                <textarea name="filevalue" id='content' class="textarea"
                    style='width:99%;height:650px;background:#ffffff;'>{$value|default=''|htmlentities ?? ''}</textarea>
                <div class="mt-20 text-c">
                    <input name="dir" value="{$dir}" type="hidden" />
                    <input name="name" value="{$dirfile}" type="hidden" />
                    <input name="type" value="{$type}" type="hidden" />
                    <!--<button name="system-base-save" id="system-base-save" class="btn radius btn-success radius" type="submit">-->
                    <!--<i class="icon-ok"></i> 确定-->
                    <!--</button>-->
                    <input class="btn radius btn-primary radius" type="submit" value="确定" />

                </div>
            </form>
            {/notempty}
        </div>
    </div>

</div>
</div>
{/block}